home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 21 / AACD 21.iso / AACD / Utilities / Help / locale / help / english / sys / skip.doc < prev    next >
Encoding:
Text File  |  2000-10-06  |  1.5 KB  |  63 lines

  1. SKIP
  2.  
  3. Skips to a label when executing script files.
  4.  
  5. Format
  6.  
  7. SKIP [<label>] [BACK]
  8.  
  9. Template
  10.  
  11. LABEL,BACK/S
  12.  
  13. Location
  14.  
  15. Internal
  16.  
  17. SKIP is used in scripts to allow you to skip ahead in the script to a <label>
  18. defined by a LAB statement. If no <label> is specified, SKIP jumps to the
  19. next LAB statement.
  20.  
  21. SKIP always searches forward from the current line of the file. However, when
  22. the BACK option is used, SKIP starts searching for the label from the
  23. beginning of the file. This allows SKIPs to points prior to the SKIP command.
  24.  
  25. You can only SKIP as far back as the last EXECUTE statement. If there are no
  26. EXECUTE statements in a script, you SKIP back to the beginning of the file.
  27.  
  28. If SKIP does not find the label specified, the command sequence terminates
  29. and the message Label <label> not found by Skip is displayed.
  30.  
  31. Example:
  32.  
  33. Assume you have the following script, called CheckFile:
  34.  
  35. .KEY name
  36. IF exists <name>
  37. SKIP message
  38. ELSE
  39. ECHO "<name> is not in this directory."
  40. QUIT
  41. ENDIF
  42. LAB message
  43. ECHO "The <name> file exists."
  44.  
  45. You can run the script by entering:
  46.  
  47. 1> EXECUTE CheckFile Document
  48.  
  49. If the Document file exists in the current directory, the execution of the
  50. script SKIPs ahead to the LAB command. The message:
  51.  
  52. The Document file exists.
  53.  
  54. Is displayed in the Shell window.
  55.  
  56. If the Document file is not in the current directory, the execution of the
  57. script jumps to the line after the ELSE statement, displaying the message:
  58.  
  59. Document is not in this directory.
  60.  
  61. See also: EXECUTE, LAB. For more examples using the SKIP command, see Chapter
  62. 8.
  63.